var core = require('core');
var wechat = core.wechat;
var api = core.api;

var unsubscribe = function(callback){
    var res = "";
    api.list.user.unsubscribe({openid: this.FromUserName, subscribe: false, subscribe_time: this.CreateTime}, function(){
        wechat.length -= 1;
        console.log('取消关注 ========== '+wechat.length);
    });
    callback(res);
};

module.exports = unsubscribe;
